<html>
<head><meta charset="utf-8"><title>Syntax_Errors · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html">Syntax_Errors</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="188406886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188406886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188406886">(Feb 17 2020 at 21:09)</a>:</h4>
<p>Is this actually expected that we report multiple errors for a single TextUnit in <a href="https://github.com/rust-analyzer/rust-analyzer/blob/326556b09078a398e641dd221ab870ee0fe47f68/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt#L298-L301" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/326556b09078a398e641dd221ab870ee0fe47f68/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt#L298-L301">this test here</a> <span class="user-mention" data-user-id="133169">@matklad</span> ?</p>



<a name="188406970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188406970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188406970">(Feb 17 2020 at 21:11)</a>:</h4>
<p>I would also display the token textual repr itself here instead of <code>R_PAREN</code> etc., but that's another topic...</p>



<a name="188407136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188407136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188407136">(Feb 17 2020 at 21:15)</a>:</h4>
<p>Yes, it is expected</p>



<a name="188407200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188407200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188407200">(Feb 17 2020 at 21:16)</a>:</h4>
<p>More specifically, at this stage it doesn't really makes sense to optimize syntax error representation a lot: as long as there's a red line in the editor, we are all good for the time being</p>



<a name="188407287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188407287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188407287">(Feb 17 2020 at 21:18)</a>:</h4>
<p><del>I don't see those errors in Code, but they do show up in vim from time to time (<code>cargo check</code> gives better errors when it runs)</del></p>



<a name="188407297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188407297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188407297">(Feb 17 2020 at 21:18)</a>:</h4>
<p><a href="/user_uploads/4715/PsVakKlpzd9J4K1Z4e5ez6YE/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/PsVakKlpzd9J4K1Z4e5ez6YE/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/PsVakKlpzd9J4K1Z4e5ez6YE/pasted_image.png"></a></div>



<a name="188407987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188407987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188407987">(Feb 17 2020 at 21:32)</a>:</h4>
<p>By representation you mean converting <code>R_PAREN</code> to <code>)</code>, right? Because I am currently working on that PR of reshaping SyntaxError.</p>



<a name="188408012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188408012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188408012">(Feb 17 2020 at 21:33)</a>:</h4>
<p>I mean I am not working of converting <code>R_PAREN</code> -&gt; <code>)</code>, ah...</p>



<a name="188410039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188410039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188410039">(Feb 17 2020 at 22:17)</a>:</h4>
<p>Hmm, I remember that automatic addition of <code>///</code> for doc comments worked, or am I drunk? <a href="/user_uploads/4715/ZVES0TtUsf9fwWxdGVW0rZtu/comments.gif" target="_blank" title="comments.gif">comments.gif</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/ZVES0TtUsf9fwWxdGVW0rZtu/comments.gif" target="_blank" title="comments.gif"><img src="/user_uploads/4715/ZVES0TtUsf9fwWxdGVW0rZtu/comments.gif"></a></div>



<a name="188410097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188410097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188410097">(Feb 17 2020 at 22:18)</a>:</h4>
<p>It works, but impl changed from <code>ontype</code> handler to a custom <code>Enter</code> keybinding</p>



<a name="188410133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188410133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188410133">(Feb 17 2020 at 22:19)</a>:</h4>
<p>One big flaw to this, is once I have removed that binding, I cannot add it back</p>



<a name="188410370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188410370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188410370">(Feb 17 2020 at 22:23)</a>:</h4>
<p>Though, I can add it back via messing with <code>keybindings.json</code></p>



<a name="188442650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188442650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Benn Sundsrud <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188442650">(Feb 18 2020 at 11:27)</a>:</h4>
<p>I'm having an issue where ra isn't highlighting certain errors until I safe, e.g. <code>fn foo() -&gt; u32 {}</code> doesn't note that the return type of the block is wrong until save.  This is in emacs with lsp-mode.  Is this known or something weird with my setup?</p>



<a name="188442732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188442732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188442732">(Feb 18 2020 at 11:28)</a>:</h4>
<p>We run <code>cargo check</code> on project load and when saving a file, but not while typing (as <code>cargo</code> needs the files to be on disk), so most diagnostics will only show up then. There are some diagnostics implemented in <code>rust-analyzer</code>, e.g. parse errors should show up immediately, but not type mismatches.</p>



<a name="188443350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188443350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Benn Sundsrud <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188443350">(Feb 18 2020 at 11:39)</a>:</h4>
<p>ah k.  Good to know it's not my setup, thanks! Also, who's emacs setup was that in the RA changelog posted on reddit, and is their .emacs public somewhere</p>



<a name="188443540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188443540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188443540">(Feb 18 2020 at 11:42)</a>:</h4>
<p>I'd look at <span class="user-mention silent" data-user-id="129457">Florian Diebold</span> 's emacs config: <a href="https://github.com/flodiebold/dotfiles/commit/b412b230ae52eec4a46651c2eb692a42aaa686ea" target="_blank" title="https://github.com/flodiebold/dotfiles/commit/b412b230ae52eec4a46651c2eb692a42aaa686ea">https://github.com/flodiebold/dotfiles/commit/b412b230ae52eec4a46651c2eb692a42aaa686ea</a></p>



<a name="188444719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188444719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188444719">(Feb 18 2020 at 12:03)</a>:</h4>
<p>well, I use a hacked-together spacemacs layer... if you don't use spacemacs, I'd look into rustic</p>



<a name="188444782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188444782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Benn Sundsrud <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188444782">(Feb 18 2020 at 12:04)</a>:</h4>
<p>I just tried to switch from my rust-mode setup to rustic and trying to get rustfmt to work the way I want on save was not great</p>



<a name="188445126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445126">(Feb 18 2020 at 12:11)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> do you think we could emit diagnosis for type mismatches if the false positive rate wasn't so large? I guess we already infer the types.</p>



<a name="188445206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445206">(Feb 18 2020 at 12:12)</a>:</h4>
<p>yes, we even already record type mismatches (and use them for one assist)</p>



<a name="188445219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445219">(Feb 18 2020 at 12:12)</a>:</h4>
<p>but the false positive rate is too large (you can see for yourself by running <code>analysis-stats</code> with <code>-v</code>)</p>



<a name="188445224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445224">(Feb 18 2020 at 12:12)</a>:</h4>
<p>Maybe by next February, then <span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="188445262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445262">(Feb 18 2020 at 12:13)</a>:</h4>
<p>I kind of hope we'll have a mostly-complete type system by then <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="188445270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445270">(Feb 18 2020 at 12:13)</a>:</h4>
<p>Hmm, which assist is that?</p>



<a name="188445283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445283">(Feb 18 2020 at 12:13)</a>:</h4>
<p>if not merged with rustc, of course</p>



<a name="188445364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445364">(Feb 18 2020 at 12:14)</a>:</h4>
<blockquote>
<p>Hmm, which assist is that?</p>
</blockquote>
<p>there's a "wrap with Ok" assist that triggers if you forget to wrap your return value in <code>Ok</code></p>



<a name="188445426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445426">(Feb 18 2020 at 12:15)</a>:</h4>
<p>I keep forgetting about these.</p>



<a name="188445442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188445442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188445442">(Feb 18 2020 at 12:15)</a>:</h4>
<p>we could probably do more of these <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="188446048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188446048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188446048">(Feb 18 2020 at 12:25)</a>:</h4>
<p>I think we should emit all the errors we can, but hide them being a disable by default feature flag</p>



<a name="188446063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188446063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188446063">(Feb 18 2020 at 12:25)</a>:</h4>
<p>and we probably should do that first for nameres errors</p>



<a name="188446074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188446074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188446074">(Feb 18 2020 at 12:25)</a>:</h4>
<p>really, that's one great question <span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> , this is a bit of work that we need to do soon!</p>



<a name="188446221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188446221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kirill Bulatov <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188446221">(Feb 18 2020 at 12:28)</a>:</h4>
<blockquote>
<p>and we probably should do that first for nameres errors</p>
</blockquote>
<p>That should also work well with the auto import assist we have: there's a possibility to specify a quickfix for the diagnostics.</p>



<a name="188823827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188823827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188823827">(Feb 22 2020 at 16:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="129457">Florian Diebold</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Syntax_Errors/near/188445219" title="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Syntax_Errors/near/188445219">said</a>:</p>
<blockquote>
<p>but the false positive rate is too large (you can see for yourself by running <code>analysis-stats</code> with <code>-v</code>)</p>
</blockquote>
<div class="codehilite"><pre><span></span>src/db.rs 32:52-32:54: Expected &amp;dyn AstDatabase, got &amp;dyn AstDatabase

src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
src/codegen/gen_syntax.rs 3:4-3:7: Expected str, got String
</pre></div>


<p>I'm not sure what I'm looking at <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span>. <code>gen_syntax.rs 3:4</code> is inside a doc comment.</p>



<a name="188824300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188824300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188824300">(Feb 22 2020 at 16:49)</a>:</h4>
<p>that's inside a macro, we don't map the spans correctly there</p>



<a name="188824357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors/near/188824357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax_Errors.html#188824357">(Feb 22 2020 at 16:50)</a>:</h4>
<p>Ah.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>